<%= form_for(@project, :html => { :multipart => true }) do |f| %>
  <% if @project.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2>

      <ul>
      <% @project.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
  <div class="field">
    <%= f.label :image %><br />
    <% if @project.avatar.exists? %>
      <%= image_tag @project.avatar.url(:medium) %><br />
    <% end %>
    <%= f.file_field :avatar %>
  </div>
  <div class="field">
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </div>
  <div class="field">
    <%= f.label :person %><br />
    <%= f.collection_select :person_id, Person.all, :id, :name %>
  </div>
  <div class="field">
    <%= f.label :description %><br />
    <%= f.text_area :description, :size => "100x15" %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
